package com.example.demoexcel.mapper;

import com.example.demoexcel.model.AreaStationData;
import com.example.demoexcel.model.NameAndValueInt;
import com.github.jeffreyning.mybatisplus.base.MppBaseMapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * @author 赵恒
 * @date 2023/7/11
 */
public interface AreaStationDataMapper extends MppBaseMapper<AreaStationData> {
    @Select("select `_区站号字符` as name, count(*) as value from  `area_station_data`  GROUP BY `_区站号字符`")
    List<NameAndValueInt> group();

    @Select("select * from `area_station_data` where `_区站号字符` = #{name} and `_资料时间` >= '2015-01-01 00:00:00' limit #{start},#{end}")
    List<AreaStationData> getByPage(@Param("name") String name, @Param("start") int start, @Param("end") int end);
}
